Optimal. Leaf size=157 \[ -\frac {2 a^2 \sin ^5(c+d x)}{5 d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}-\frac {2 a^2 \sin (c+d x)}{d}+\frac {a^2 \tan (c+d x)}{d}+\frac {2 a^2 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a^2 \sin (c+d x) \cos ^5(c+d x)}{6 d}+\frac {7 a^2 \sin (c+d x) \cos ^3(c+d x)}{24 d}+\frac {7 a^2 \sin (c+d x) \cos (c+d x)}{16 d}-\frac {25 a^2 x}{16} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps used = 18, number of rules used = 8, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3872, 2872, 2637, 2633, 2635, 8, 3770, 3767} \[ -\frac {2 a^2 \sin ^5(c+d x)}{5 d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}-\frac {2 a^2 \sin (c+d x)}{d}+\frac {a^2 \tan (c+d x)}{d}+\frac {2 a^2 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a^2 \sin (c+d x) \cos ^5(c+d x)}{6 d}+\frac {7 a^2 \sin (c+d x) \cos ^3(c+d x)}{24 d}+\frac {7 a^2 \sin (c+d x) \cos (c+d x)}{16 d}-\frac {25 a^2 x}{16} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 2637
Rule 2872
Rule 3767
Rule 3770
Rule 3872
Rubi steps
\begin {align*} \int (a+a \sec (c+d x))^2 \sin ^6(c+d x) \, dx &=\int (-a-a \cos (c+d x))^2 \sin ^4(c+d x) \tan ^2(c+d x) \, dx\\ &=\frac {\int \left (-2 a^8-6 a^8 \cos (c+d x)+6 a^8 \cos ^3(c+d x)+2 a^8 \cos ^4(c+d x)-2 a^8 \cos ^5(c+d x)-a^8 \cos ^6(c+d x)+2 a^8 \sec (c+d x)+a^8 \sec ^2(c+d x)\right ) \, dx}{a^6}\\ &=-2 a^2 x-a^2 \int \cos ^6(c+d x) \, dx+a^2 \int \sec ^2(c+d x) \, dx+\left (2 a^2\right ) \int \cos ^4(c+d x) \, dx-\left (2 a^2\right ) \int \cos ^5(c+d x) \, dx+\left (2 a^2\right ) \int \sec (c+d x) \, dx-\left (6 a^2\right ) \int \cos (c+d x) \, dx+\left (6 a^2\right ) \int \cos ^3(c+d x) \, dx\\ &=-2 a^2 x+\frac {2 a^2 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {6 a^2 \sin (c+d x)}{d}+\frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{2 d}-\frac {a^2 \cos ^5(c+d x) \sin (c+d x)}{6 d}-\frac {1}{6} \left (5 a^2\right ) \int \cos ^4(c+d x) \, dx+\frac {1}{2} \left (3 a^2\right ) \int \cos ^2(c+d x) \, dx-\frac {a^2 \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}+\frac {\left (2 a^2\right ) \operatorname {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{d}-\frac {\left (6 a^2\right ) \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=-2 a^2 x+\frac {2 a^2 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {2 a^2 \sin (c+d x)}{d}+\frac {3 a^2 \cos (c+d x) \sin (c+d x)}{4 d}+\frac {7 a^2 \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {a^2 \cos ^5(c+d x) \sin (c+d x)}{6 d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}-\frac {2 a^2 \sin ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d}-\frac {1}{8} \left (5 a^2\right ) \int \cos ^2(c+d x) \, dx+\frac {1}{4} \left (3 a^2\right ) \int 1 \, dx\\ &=-\frac {5 a^2 x}{4}+\frac {2 a^2 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {2 a^2 \sin (c+d x)}{d}+\frac {7 a^2 \cos (c+d x) \sin (c+d x)}{16 d}+\frac {7 a^2 \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {a^2 \cos ^5(c+d x) \sin (c+d x)}{6 d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}-\frac {2 a^2 \sin ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d}-\frac {1}{16} \left (5 a^2\right ) \int 1 \, dx\\ &=-\frac {25 a^2 x}{16}+\frac {2 a^2 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {2 a^2 \sin (c+d x)}{d}+\frac {7 a^2 \cos (c+d x) \sin (c+d x)}{16 d}+\frac {7 a^2 \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {a^2 \cos ^5(c+d x) \sin (c+d x)}{6 d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}-\frac {2 a^2 \sin ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.56, size = 124, normalized size = 0.79 \[ -\frac {a^2 (\cos (c+d x)+1)^2 \sec ^4\left (\frac {1}{2} (c+d x)\right ) \left (384 \sin ^5(c+d x)+640 \sin ^3(c+d x)+1920 \sin (c+d x)-255 \sin (2 (c+d x))-15 \sin (4 (c+d x))+5 \sin (6 (c+d x))+420 \tan ^{-1}(\tan (c+d x))-960 \tan (c+d x)-1920 \tanh ^{-1}(\sin (c+d x))+1080 c+1080 d x\right )}{3840 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 158, normalized size = 1.01 \[ -\frac {375 \, a^{2} d x \cos \left (d x + c\right ) - 240 \, a^{2} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) + 240 \, a^{2} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (40 \, a^{2} \cos \left (d x + c\right )^{6} + 96 \, a^{2} \cos \left (d x + c\right )^{5} - 70 \, a^{2} \cos \left (d x + c\right )^{4} - 352 \, a^{2} \cos \left (d x + c\right )^{3} - 105 \, a^{2} \cos \left (d x + c\right )^{2} + 736 \, a^{2} \cos \left (d x + c\right ) - 240 \, a^{2}\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.51, size = 193, normalized size = 1.23 \[ -\frac {375 \, {\left (d x + c\right )} a^{2} - 480 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) + 480 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {480 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} + \frac {2 \, {\left (615 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 3485 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 7926 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 8586 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 2595 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 345 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{6}}}{240 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.69, size = 172, normalized size = 1.10 \[ \frac {5 a^{2} \cos \left (d x +c \right ) \left (\sin ^{5}\left (d x +c \right )\right )}{6 d}+\frac {25 a^{2} \cos \left (d x +c \right ) \left (\sin ^{3}\left (d x +c \right )\right )}{24 d}+\frac {25 a^{2} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{16 d}-\frac {25 a^{2} x}{16}-\frac {25 a^{2} c}{16 d}-\frac {2 a^{2} \left (\sin ^{5}\left (d x +c \right )\right )}{5 d}-\frac {2 a^{2} \left (\sin ^{3}\left (d x +c \right )\right )}{3 d}-\frac {2 a^{2} \sin \left (d x +c \right )}{d}+\frac {2 a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {a^{2} \left (\sin ^{7}\left (d x +c \right )\right )}{d \cos \left (d x +c \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.54, size = 174, normalized size = 1.11 \[ -\frac {64 \, {\left (6 \, \sin \left (d x + c\right )^{5} + 10 \, \sin \left (d x + c\right )^{3} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 30 \, \sin \left (d x + c\right )\right )} a^{2} - 5 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} + 60 \, d x + 60 \, c + 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} + 120 \, {\left (15 \, d x + 15 \, c - \frac {9 \, \tan \left (d x + c\right )^{3} + 7 \, \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1} - 8 \, \tan \left (d x + c\right )\right )} a^{2}}{960 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.16, size = 235, normalized size = 1.50 \[ \frac {\frac {57\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{8}+\frac {431\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{12}+\frac {8041\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{120}+\frac {91\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{2}-\frac {797\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{40}-\frac {27\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}-\frac {7\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-9\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+9\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {25\,a^2\,x}{16}+\frac {4\,a^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________